package com.hyacinth.server.interceptor;

import com.hyacinth.server.action.param.Param;
import com.hyacinth.server.context.AuroraContext;

/**
 * 拦截器
 * @author zhangfb
 * @version 1.0.0.1
 * @since JDK 1.8
 */
public abstract class AuroraIntercept {

    private int order;

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    /**
     * 前置处理
     * @return 处理结果
     *   true 成功 | false 失败
     * @param context
     * @param param
     */
    protected boolean before(AuroraContext context, Param param) {
        return true;
    }

    /**
     * 后置处理
     */
    protected void after(AuroraContext context, Param param) {

    }
}
